package com.xuelang.pipeline.entry.resource;

import com.xuelang.pipeline.app.resource.GitOperationService;
import com.xuelang.pipeline.client.common.constant.DictDTO;
import com.xuelang.pipeline.client.common.result.ApiResult;
import com.xuelang.pipeline.client.resource.IGitOperationService;
import com.xuelang.pipeline.client.resource.dto.GitOperationDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author liuyuan.ly
 * @since 2024/6/14 10:39
 */
@RestController
@RequestMapping("/git")
public class GitOperationController implements IGitOperationService {

    @Autowired
    private GitOperationService gitOperationService;

    @Override
    public ApiResult<List<DictDTO>> getRemoteBranchListDict(GitOperationDTO operationDTO) {
        return ApiResult.success(gitOperationService.getRemoteBranchList(operationDTO));
    }
}
